home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr11
/
pdox693.zip
/
TI521.ASC
< prev
next >
Wrap
Text File
|
1992-08-12
|
1KB
|
67 lines
PRODUCT : PARADOX NUMBER : 521
VERSION : ALL
OS : DOS
DATE : August 12, 1992 PAGE : 1/1
TITLE : Adding the leading zeros to a zipcode field
The following script demonstrates how to add leading zeros to
zipcode fields that are formatted as numeric data types. The
script first restructures the field to "A10". The next step is
to perform a ChangeTo query on the zipcode field for all records
that only have four numbers and all records that only have three
numbers.
Menu {Modify} {Restructure} {ZIPCODE}
; ZIPCODE is the table name
MOVETO [Field Name]
LOCATE "ZIP"
; ZIP is the field name
Right CtrlBackspace TYPEIN "A10" Enter
Do_It!
Query
Zipcode | Zip |
| _4, @@@@, changeto "0"+_4 |
| _3, @@@, changeto "00"+_3 |
| |
EndQuery
DISCLAIMER: You have the right to use this technical information
subject to the terms of the No-Nonsense License Statement that
you received with the Borland product to which this information
pertains.